1. Field of the Invention
The present invention relates to a method and apparatus for handling a handover procedure, and more particularly, to a method and apparatus for handling a handover procedure for a Radio Resource Control (RRC) layer in a user equipment (UE) of a wireless communication system.
2. Description of the Prior Art
Long Term Evolution wireless communication system (LTE system), an advanced high-speed wireless communication system established upon the 3G mobile telecommunication system, supports only packet-switched transmission, and tends to implement both Medium Access Control (MAC) layer and Radio Link Control (RLC) layer in one single communication site, such as in Node B (NB) alone rather than in NB and RNC (Radio Network Controller) respectively, so that the system structure becomes simple.
Communications protocols utilized in the LTE system include Access Stratum (AS) and Non-Access Stratum (NAS). AS comprises various sub-layers for different functions, including Radio Resource Control (RRC), Radio Link Control (RLC), Media Access Control (MAC), Packet Data Convergence Protocol (PDCP) and so on. The sub-layers mentioned, and their operating principles, are well known in the art, and detailed description thereof is omitted. The RRC layer, a Layer 3 protocol, is the core of communications protocols related to AS and is located in a network end and a user equipment (UE). The RRC layer uses RRC messages to perform RRC procedures. RRC messages are formed from many information elements (IEs) used for embedding necessary information for setting, changing, or releasing protocol entities of Layer 2 and Layer 1, thereby establishing, adjusting, or canceling information exchange channels to perform data packet transportation.
In LTE system, the network end indicates the UE to modify an RRC connection state, e.g. to establish/modify/release Radio Bearers (RBs), to perform a handover procedure, or to configure/modify radio measurements, through a RRC Connection Reconfiguration message. According to related specification, when the RRC Connection Reconfiguration message includes an Information Element (IE) “mobilityControlInformation”, the UE shall perform the handover procedure as soon as possible following reception of the RRC Connection Reconfiguration message. In such a situation, the UE shall first synchronize to downlink of a target cell, and request the MAC layer to perform a random access procedure for accessing the target cell.
Upon successful completion of the handover procedure, i.e. when the MAC layer indicates the random access procedure is successfully completed, the UE shall perform the following steps:                (1) Apply a new security configuration (including security keys and security algorithms) to lower layers such as the PDCP layer if an IE “securityConfiguration” is included in the RRC Connection Reconfiguration message. That means the new security configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the handover procedure.        (2) Update radio resource configurations based on an IE “radioResourceConfiguration” included in the received RRC Connection Reconfiguration message.        (3) Re-establish the RLC layer and reset the MAC layer.        (4) Indicate occurrence of the handover procedure to the PDCP layer.        
Besides, when the RLC layer is re-established, the UE shall reassemble RLC Service Data Units (SDUs) and deliver the reassembled RLC SDUs to the PDCP layer no matter whether the SDUs are delivered in order of sequence numbers. That is to say, upon occurrence of the handover procedure, the RLC layer is allowed to deliver out-of-sequence Protocol Data Units (PDUs) received from a source cell to the PDCP layer. Detailed operation of re-establishing the RLC layer is not further described, and can be referred to in the related specifications.
On the other hand, according to the PDCP specification, when upper layers indicate that a handover procedure has occurred, for radio bearers that are mapped on Acknowledged Mode RLC entities, the UE shall perform maintenance of PDCP sequence numbers, header decompression and deciphering for PDCP PDUs received from lower layers and store the out-of-sequence PDCP SDUs, if any, in the reordering buffer until it is indicated to submit them to upper layers. Note that these out-of-sequence SDUs are received because of the lower layer re-establishment or reset.
However, based on the above operation, the UE has applied the new security configuration (including security keys and security algorithms) to the PDCP layer before the PDCP layer is indicated occurrence of the handover procedure, such that the PDCP layer of the UE cannot perform decompression and deciphering for the received PDCP PDUs correctly since the out-of-sequence SDUs, which are delivered due to the RLC layer re-establishment, are encrypted by original security configurations. Consequently, situations like data error or data lost may occur.
Besides, the random access procedure includes two types: contention based and non-contention based. If the random access procedure initiated by the handover procedure is contention based, the UE shall send a RRC Connection Reconfiguration Complete message during the random access procedure. This message is sent to the target cell and therefore new radio resource configuration and new security configuration are required. However, based on the above operation, the new radio resource configuration and the new security configuration are applied to the UE upon successful completion of the handover procedure, such that the target cell cannot correctly receive and interpret the RRC Connection Reconfiguration Complete message, resulting in failure of the handover procedure.